<!DOCTYPE html>
<html>

<head>
    <metacharset="UTF-8">
        <title>v-if指令</title>
</head>

<body>
    <div id="app">
        <template v-if="!isLogin">
            <form>
                <p>username:<input type="text"></p>
                <p>password:<input type="password"></p>
            </form>
        </template>
    </div>
    <script src="https://cdn.bootcdn.net/ajax/libs/vue/3.0.2/vue.global.prod.js"></script>
    <script>
        const vm = Vue.createApp({
            data() {
                return {
                    isLogin: true
                }
            }
        }).mount('#app');
    </script>
</body>

</html>